<template>
  <div id="app">
    <router-view></router-view>
  </div>
</template>

<style>
/* 渐变背景样式 */
.gradient-bg {
  background: linear-gradient(135deg, #6b73ff 0%, #000dff 100%);
}

/* 卡片悬停效果 */
.card-hover:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* 翻转卡片效果 */
.flip-card {
  perspective: 1000px;
}
.flip-card-inner {
  transition: transform 0.6s;
  transform-style: preserve-3d;
}
.flip-card.flipped .flip-card-inner {
  transform: rotateY(180deg);
}
.flip-card-front, .flip-card-back {
  backface-visibility: hidden;
}
.flip-card-back {
  transform: rotateY(180deg);
}

/* 进度环动画 */
.progress-ring__circle {
  transition: stroke-dashoffset 0.35s;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
}

/* 浮动动画效果 */
.animate-float-slow {
  animation: float 6s ease-in-out infinite;
}
.animate-float-medium {
  animation: float 4s ease-in-out infinite;
}
.animate-float-fast {
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
  100% { transform: translateY(0px); }
}

/* 打字机效果 */
.typing-text::after {
  content: "|";
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* 树状图绘制动画 */
#tree-svg path {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: draw-line 2s forwards ease-in-out;
}

@keyframes draw-line {
  to {
    stroke-dashoffset: 0;
  }
}

/* 粒子效果样式 */
.particle {
  position: absolute;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  pointer-events: none;
}

/* 科技线条脉冲效果 */
@keyframes pulse {
  0% { opacity: 0.1; }
  100% { opacity: 0.7; }
}

/* 页面切换过渡效果 */
section {
  transition: opacity 0.5s ease, transform 0.5s ease;
}
section.hidden {
  opacity: 0;
  transform: translateY(20px);
  position: absolute;
  pointer-events: none;
  visibility: hidden;
  display: block !important;
}
section:not(.hidden) {
  opacity: 1;
  transform: translateY(0);
}

/* 模态框过渡效果 */
.modal-container {
  transition: opacity 0.3s ease, visibility 0.3s;
}
.modal-container.hidden {
  opacity: 0;
  visibility: hidden;
}
.modal-content {
  transform: scale(0.9);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.modal-container:not(.hidden) .modal-content {
  transform: scale(1);
  opacity: 1;
}

/* 导航项效果 */
.nav-item {
  position: relative;
}
.nav-item::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: #f0f9ff;
  transition: width 0.3s ease;
}
.nav-item:hover::after {
  width: 100%;
}
.nav-item.active::after {
  width: 100%;
}

/* 按钮点击波纹效果 */
.ripple-btn {
  position: relative;
  overflow: hidden;
}
.ripple-btn .ripple {
  position: absolute;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.4);
  transform: scale(0);
  animation: ripple 0.6s linear;
  pointer-events: none;
}

@keyframes ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* 底部导航效果 */
.bottom-nav-item {
  transition: color 0.3s ease, transform 0.3s ease;
}
.bottom-nav-item.active {
  color: #2563eb;
}
.bottom-nav-item:active {
  transform: scale(0.9);
}

/* 底部切换效果 */
[id$="-footer"] {
  transition: opacity 0.5s ease, transform 0.5s ease;
}
[id$="-footer"].hidden {
  opacity: 0;
  transform: translateY(20px);
  position: absolute;
  pointer-events: none;
  visibility: hidden;
  display: block !important;
}
[id$="-footer"]:not(.hidden) {
  opacity: 1;
  transform: translateY(0);
}
</style>
